package com.diudiutechnology.www.yadiudiu.yadiudiu.singlecall.MyActivity;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.text.Html;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;

import com.diudiutechnology.www.yadiudiu.yadiudiu.model.BuyACarFragmentModel;
import com.diudiutechnology.www.yadiudiu.R;
import com.diudiutechnology.www.yadiudiu.yadiudiu.mine.MyAdapter.TotalEvaluationAdapter;

import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/8/22.
 * 全部评价
 */

public class ShopEvaluationActivity extends Activity implements View.OnClickListener {

    @Bind(R.id.release_listview)
    ListView releaseListview;

    @Bind(R.id.all_evaluation)
    TextView all_evaluation;

    List<BuyACarFragmentModel> buycarlist;
    TotalEvaluationAdapter adapter;

    Context context;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shop_evaluation);
        ButterKnife.bind(this);
        context = this;
        initView();
    }

    private void initView() {

        adapter = new TotalEvaluationAdapter(context);
        releaseListview.setAdapter(adapter);
        all_evaluation.setText(Html.fromHtml("查看全部评价<font color='#FF4537'>(157)</font>"));
        initData();

    }

    private void initData() {
//        buycarlist = new ArrayList<>();
//        BuyACarFragmentModel model = new BuyACarFragmentModel();
//        model.setName("只是想改个名字");
//        model.setStar("2");
//        model.setDistance("");
//        model.setDate("老板服务态度挺好的，洗车也洗得很彻底，里外都收 拾得挺干净的");
//        model.setPraise("2017.05.31");
//        buycarlist.add(model);
//        adapter.addItem(buycarlist);
    }

    @Override
    public void onClick(View view) {

    }
}

